package pku.ss.news.model;

public class WeightedNews implements Comparable{
	private News news;
	private int score;
	public WeightedNews(News news, int score) {
		super();
		this.news = news;
		this.score = score;
	}
	public News getNews() {
		return news;
	}
	public void setNews(News news) {
		this.news = news;
	}
	public int getScore() {
		return score;
	}
	public void setScore(int score) {
		this.score = score;
	}
	
	public int compareTo(Object o) {
		if(this.score<((WeightedNews)o).score){
			return -1;
		}
		else {
			return 1;
		}
	}
}
